package com.echo.code.thread.mode.listener;

import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

/**
 * TestCase Created by baiyap on 2018/9/24.
 */
public class TestCase {

  public static void main(String[] args) {
    Bus bus = new EventBus(Executors.newCachedThreadPool(), null);
    bus.register(new Listener());
    bus.post("hello", "123");
    try {
      TimeUnit.SECONDS.sleep(5);
    } catch (InterruptedException e) {
    }
    bus.close();
  }
}